//
//  JZBChangePSWViewController.m
//  JZB
//
//  Created by  on 2022/8/31.
//

#import "JZBChangePSWViewController.h"

@interface JZBChangePSWViewController ()
@property (strong, nonatomic) IBOutlet UITextField *input1;
@property (strong, nonatomic) IBOutlet UITextField *input2;

@end

@implementation JZBChangePSWViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self initUI];
}
- (void)initUI{
    self.title = LS(@"修改密码");
    self.view.backgroundColor = [UIColor whiteColor];
}
- (IBAction)actionForBtn:(UIButton *)sender {
    if (self.input1.text.length <= 0) {
        return [RLHud msg:LS(@"密码不能为空")];
    }else if ([self.input2.text isEqualToString:self.input1.text] == NO){
        return [RLHud msg:LS(@"两次密码不一致")];
    }
    NSString *api = [NSString stringWithFormat:@"%@?data=%@",api_updatePSW,self.input1.text];
    [CCHttp get:api para:nil header:nil success:^(id  _Nonnull response) {
        [RLHud startHud:LS(@"修改成功") stopTime:1.5 handle:^{
            [self backBtnAction];
        }];
    } fail:^(NSError * _Nonnull error) {}];
}



@end
